﻿#if USE_UNI_LUA
using LuaAPI = UniLua.Lua;
using RealStatePtr = UniLua.ILuaState;
using LuaCSFunction = UniLua.CSharpFunctionDelegate;
#else
using LuaAPI = XLua.LuaDLL.Lua;
using RealStatePtr = System.IntPtr;
using LuaCSFunction = XLuaBase.lua_CSFunction;
#endif

using XLua;
using System.Collections.Generic;


namespace XLua.CSObjectWrap
{
    using Utils = XLua.Utils;
    public class SpriteContentSizeFitterWrap 
    {
        public static void __Register(RealStatePtr L)
        {
			ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
			System.Type type = typeof(SpriteContentSizeFitter);
			Utils.BeginObjectRegister(type, L, translator, 0, 1, 7, 7);
			
			Utils.RegisterFunc(L, Utils.METHOD_IDX, "UpdateContent", _m_UpdateContent);
			
			
			Utils.RegisterFunc(L, Utils.GETTER_IDX, "text", _g_get_text);
            Utils.RegisterFunc(L, Utils.GETTER_IDX, "outWidth", _g_get_outWidth);
            Utils.RegisterFunc(L, Utils.GETTER_IDX, "offsetObjTransform", _g_get_offsetObjTransform);
            Utils.RegisterFunc(L, Utils.GETTER_IDX, "btnObjTransform", _g_get_btnObjTransform);
            Utils.RegisterFunc(L, Utils.GETTER_IDX, "btnSpace", _g_get_btnSpace);
            Utils.RegisterFunc(L, Utils.GETTER_IDX, "btnObjSize", _g_get_btnObjSize);
            Utils.RegisterFunc(L, Utils.GETTER_IDX, "isTest", _g_get_isTest);
            
			Utils.RegisterFunc(L, Utils.SETTER_IDX, "text", _s_set_text);
            Utils.RegisterFunc(L, Utils.SETTER_IDX, "outWidth", _s_set_outWidth);
            Utils.RegisterFunc(L, Utils.SETTER_IDX, "offsetObjTransform", _s_set_offsetObjTransform);
            Utils.RegisterFunc(L, Utils.SETTER_IDX, "btnObjTransform", _s_set_btnObjTransform);
            Utils.RegisterFunc(L, Utils.SETTER_IDX, "btnSpace", _s_set_btnSpace);
            Utils.RegisterFunc(L, Utils.SETTER_IDX, "btnObjSize", _s_set_btnObjSize);
            Utils.RegisterFunc(L, Utils.SETTER_IDX, "isTest", _s_set_isTest);
            
			
			Utils.EndObjectRegister(type, L, translator, null, null,
			    null, null, null);

		    Utils.BeginClassRegister(type, L, __CreateInstance, 1, 0, 0);
			
			
            
			
			
			
            Utils.RegisterFunc(L, Utils.CLS_IDX, "New", __CreateInstanceNew);
			Utils.EndClassRegister(type, L, translator);
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int __CreateInstance(RealStatePtr L)
        {
            
			try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
				if(LuaAPI.lua_gettop(L) == 1)
				{
					
					var gen_ret = new SpriteContentSizeFitter();
					translator.Push(L, gen_ret);
                    
					return 1;
				}
				
			}
			catch(System.Exception gen_e) {
				return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
			}
            return LuaAPI.luaL_error(L, "invalid arguments to SpriteContentSizeFitter constructor!");
            
        }

        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int __CreateInstanceNew(RealStatePtr L)
        {
            
			try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
				if(LuaAPI.lua_gettop(L) == 0)
				{
					
					var gen_ret = new SpriteContentSizeFitter();
					translator.Push(L, gen_ret);
                    
					return 1;
				}
				
			}
			catch(System.Exception gen_e) {
				return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
			}
            return LuaAPI.luaL_error(L, "invalid arguments to SpriteContentSizeFitter constructor!");
            
        }

        
		
        
		
        
        
        
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _m_UpdateContent(RealStatePtr L)
        {
		    try {
            
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
            
            
                SpriteContentSizeFitter gen_to_be_invoked = (SpriteContentSizeFitter)translator.FastGetCSObj(L, 1);
            
            
                
                {
                    
                    gen_to_be_invoked.UpdateContent(  );
                    
                    
                    
                    return 0;
                }
                
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            
        }
        
        
        
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _g_get_text(RealStatePtr L)
        {
		    try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
			
                SpriteContentSizeFitter gen_to_be_invoked = (SpriteContentSizeFitter)translator.FastGetCSObj(L, 1);
                translator.Push(L, gen_to_be_invoked.text);
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            return 1;
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _g_get_outWidth(RealStatePtr L)
        {
		    try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
			
                SpriteContentSizeFitter gen_to_be_invoked = (SpriteContentSizeFitter)translator.FastGetCSObj(L, 1);
                LuaAPI.lua_pushnumber(L, gen_to_be_invoked.outWidth);
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            return 1;
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _g_get_offsetObjTransform(RealStatePtr L)
        {
		    try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
			
                SpriteContentSizeFitter gen_to_be_invoked = (SpriteContentSizeFitter)translator.FastGetCSObj(L, 1);
                translator.Push(L, gen_to_be_invoked.offsetObjTransform);
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            return 1;
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _g_get_btnObjTransform(RealStatePtr L)
        {
		    try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
			
                SpriteContentSizeFitter gen_to_be_invoked = (SpriteContentSizeFitter)translator.FastGetCSObj(L, 1);
                translator.Push(L, gen_to_be_invoked.btnObjTransform);
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            return 1;
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _g_get_btnSpace(RealStatePtr L)
        {
		    try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
			
                SpriteContentSizeFitter gen_to_be_invoked = (SpriteContentSizeFitter)translator.FastGetCSObj(L, 1);
                LuaAPI.lua_pushnumber(L, gen_to_be_invoked.btnSpace);
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            return 1;
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _g_get_btnObjSize(RealStatePtr L)
        {
		    try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
			
                SpriteContentSizeFitter gen_to_be_invoked = (SpriteContentSizeFitter)translator.FastGetCSObj(L, 1);
                LuaAPI.lua_pushnumber(L, gen_to_be_invoked.btnObjSize);
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            return 1;
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _g_get_isTest(RealStatePtr L)
        {
		    try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
			
                SpriteContentSizeFitter gen_to_be_invoked = (SpriteContentSizeFitter)translator.FastGetCSObj(L, 1);
                LuaAPI.lua_pushboolean(L, gen_to_be_invoked.isTest);
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            return 1;
        }
        
        
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _s_set_text(RealStatePtr L)
        {
		    try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
			
                SpriteContentSizeFitter gen_to_be_invoked = (SpriteContentSizeFitter)translator.FastGetCSObj(L, 1);
                gen_to_be_invoked.text = (TMPro.TextMeshPro)translator.GetObject(L, 2, typeof(TMPro.TextMeshPro));
            
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            return 0;
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _s_set_outWidth(RealStatePtr L)
        {
		    try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
			
                SpriteContentSizeFitter gen_to_be_invoked = (SpriteContentSizeFitter)translator.FastGetCSObj(L, 1);
                gen_to_be_invoked.outWidth = (float)LuaAPI.lua_tonumber(L, 2);
            
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            return 0;
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _s_set_offsetObjTransform(RealStatePtr L)
        {
		    try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
			
                SpriteContentSizeFitter gen_to_be_invoked = (SpriteContentSizeFitter)translator.FastGetCSObj(L, 1);
                gen_to_be_invoked.offsetObjTransform = (UnityEngine.Transform)translator.GetObject(L, 2, typeof(UnityEngine.Transform));
            
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            return 0;
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _s_set_btnObjTransform(RealStatePtr L)
        {
		    try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
			
                SpriteContentSizeFitter gen_to_be_invoked = (SpriteContentSizeFitter)translator.FastGetCSObj(L, 1);
                gen_to_be_invoked.btnObjTransform = (UnityEngine.Transform)translator.GetObject(L, 2, typeof(UnityEngine.Transform));
            
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            return 0;
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _s_set_btnSpace(RealStatePtr L)
        {
		    try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
			
                SpriteContentSizeFitter gen_to_be_invoked = (SpriteContentSizeFitter)translator.FastGetCSObj(L, 1);
                gen_to_be_invoked.btnSpace = (float)LuaAPI.lua_tonumber(L, 2);
            
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            return 0;
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _s_set_btnObjSize(RealStatePtr L)
        {
		    try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
			
                SpriteContentSizeFitter gen_to_be_invoked = (SpriteContentSizeFitter)translator.FastGetCSObj(L, 1);
                gen_to_be_invoked.btnObjSize = (float)LuaAPI.lua_tonumber(L, 2);
            
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            return 0;
        }
        
        [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))]
        static int _s_set_isTest(RealStatePtr L)
        {
		    try {
                ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L);
			
                SpriteContentSizeFitter gen_to_be_invoked = (SpriteContentSizeFitter)translator.FastGetCSObj(L, 1);
                gen_to_be_invoked.isTest = LuaAPI.lua_toboolean(L, 2);
            
            } catch(System.Exception gen_e) {
                return LuaAPI.luaL_error(L, $"c# exception: {gen_e}\n{Yoozoo.Framework.Managers.LuaManager.GetTraceBack()}");
            }
            return 0;
        }
        
		
		
		
		
    }
}
